package kr.co.redcircle.service.oAuth.model;


import org.scribe.model.Verb;

public abstract class AbstractCommand implements ICommand{

	public static final String GET_USER_INFORMATION = "get.user.information";
	
	private String keyID;
	private String keyMethod;
	private String keyDescription;
	private String keyVALUE;
	private String url;
	private String commandClass;
	private ITemplate template;
	
	
		
	public ITemplate getTemplate() {
		return template;
	}
	public void setTemplate(ITemplate template) {
		this.template = template;
	}
	public String getUrl() {
		return url;
	}
	public void setUrl(String url) {
		this.url = url;
	}
	public String getCommandClass() {
		return commandClass;
	}
	public void setCommandClass(String commandClass) {
		this.commandClass = commandClass;
	}
	public String getKeyID() {
		return keyID;
	}
	public void setKeyID(String keyID) {
		this.keyID = keyID;
	}
	public String getKeyMethod() {
		return keyMethod;
	}
	public void setKeyMethod(String keyMethod) {
		this.keyMethod = keyMethod;
	}
	public String getKeyDescription() {
		return keyDescription;
	}
	public void setKeyDescription(String keyDescription) {
		this.keyDescription = keyDescription;
	}
	public String getKeyVALUE() {
		return keyVALUE;
	}
	public void setKeyVALUE(String keyVALUE) {
		this.keyVALUE = keyVALUE;
	}

	public Verb getVerb(String method) {
		if (method.equals("post")){
			return Verb.POST;
		}else if (method.equals("get")){
			return Verb.GET;
		}else if (method.equals("put")){
			return Verb.PUT;
		}else if (method.equals("delete")){
			return Verb.DELETE;
		}
		
		return null;
	}
	
	abstract public ISNSResult invoke(ISNSCommandParameters iexec);
}
